home *** CD-ROM | disk | FTP | other *** search
Text File | 1993-09-16 | 72.6 KB | 1,742 lines | [TEXT/MPS ] |
- {***********************************************************
-
- Created: Tuesday, February 23, 1993 at 6:15PM
- OCETemplates.p
- Pascal Interface to the Macintosh Libraries
-
- ••• Apple Confidential •••
- ••• Provided with AOCE Beta seed under license agreement with •••
- ••• Apple Computer, Inc. Use for any purpose other than •••
- ••• development of AOCE-based Macintosh products is a violation •••
- ••• of the license agreement. •••
-
- Copyright Apple Computer, Inc. 1990-1993
- All rights reserved
-
- ***********************************************************}
-
-
- {$IFC UNDEFINED UsingIncludes}
- {$SETC UsingIncludes:= 0}
- {$ENDC}
-
- {$IFC NOT UsingIncludes}
- UNIT OCETemplates;
- INTERFACE
- {$ENDC}
-
- {$IFC UNDEFINED UsingOCETemplates}
- {$SETC UsingOCETemplates:= 1}
-
- {$I+}
- {$SETC OCETemplatesIncludes:= UsingIncludes}
- {$SETC UsingIncludes:= 1}
-
-
- {$IFC UNDEFINED UsingTypes}
- {$I $$Shell(PInterfaces)Types.p}
- {$ENDC}
-
- {$IFC UNDEFINED UsingEvents}
- {$I $$Shell(PInterfaces)Events.p}
- {$ENDC}
-
- {$IFC UNDEFINED UsingOCE}
- {$I OCE.p}
- {$ENDC}
-
- {$IFC UNDEFINED UsingOCEStandardMail}
- {$I OCEStandardMail.p}
- {$ENDC}
-
- {$SETC UsingIncludes:= OCETemplatesIncludes}
-
-
-
- {**********************************************************************************************}
- {******************************** Template Resource Constants: ********************************}
- {**********************************************************************************************}
-
-
- { Current versions of all the different template types: }
-
- CONST
- kDETAspectVersion = -978;
- kDETInfoPageVersion = -978;
- kDETKillerVersion = -978;
- kDETForwarderVersion = -978;
- kDETFileTypeVersion = -978;
-
-
- { "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
- separation you like, so LONGINT as two separate templates don't have overlapping resources): }
- kDETIDSep = 250;
-
- { A few predefined base IDs (again, just suggestions): }
- kDETFirstID = (1000);
- kDETSecondID = (1000+kDETIDSep);
- kDETThirdID = (1000+2*kDETIDSep);
- kDETFourthID = (1000+3*kDETIDSep);
- kDETFifthID = (1000+4*kDETIDSep);
-
- { All templates include the following resource fork resources:
- resource ('rstr', id+kDETTemplateName) contains the name of the template }
-
- kDETTemplateName = 0;
-
- { Aspect, info-pages, and forwarders include the following as well:
- resource ('rstr', id+kDETRecordType) contains the type of record this applies to
- resource ('rstr', id+kDETAttributeType) contains the type of attribute this applies to
- resource ('detn', id+kDETAttributeValueTag) contains the tag of the attribute this applies to
- }
-
- kDETRecordType = 1;
- kDETAttributeType = 2;
- kDETAttributeValueTag = 3;
-
-
- { ************************************ Aspects }
-
- { In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
- defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
- both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
- resource). Resource types are given in all cases below; even if there is no actual resource (for example in
- the case of kDETAspectName), it indicates the type for the dynamically generated property.
-
- Type Offset Description
- ---- ------ -----------
- 'deta' 0 Identifies the type of resource
- 'detc' kDETCode Is the code resource, if any is used
- 'rstr' kDETAspectName Contains the name of the item (attribute main aspect only)
- 'rst#' kDETAspectCategory Contains the internal categories for the record type (main aspect only)
- 'rstr' kDETAspectKind Is the item kind to display (main aspect only)
- 'detn' kDETAspectGender Is the gender of this kind of object for internationalization (main aspect only)
- 'rstr' kDETAspectWhatIs Is string for balloon help when item is in sublist (main aspect only)
- 'ICN#' kDETAspectMainBitmap
- 'icl8' kDETAspectMainBitmap
- 'icl4' kDETAspectMainBitmap
- 'ics#' kDETAspectMainBitmap
- 'ics8' kDETAspectMainBitmap
- 'ics4' kDETAspectMainBitmap
- 'sicn' kDETAspectMainBitmap Is the icon suite to display for this item type (main aspect only)
- 'rst#' kDETAspectBalloons Is a list of strings for balloon help; for each item is an info-page, it's
- property # times 2 is used as an index into this array; if the item is not editable,
- then the property # times 2 plus 1 is used
- 'rstr' kDETAspectNewMenuName Is the string to be used for "New ..." in the Directories menu, if any
- 'rstr' kDETAspectNewEntryName Is the name to be used for new entries (with a digit appended if not unique)
- 'detb' kDETAspectNewValue Is the value to use when creating a new attribute value; the first four bytes
- is the tag; the rest is the attribute value contents
- 'dett' kDETAspectLookup Is the attribute-to-property translation table
- 'rstr' kDETAspectDragInString Is a string describing the action of dragging into this aspect
- 'rst#' kDETAspectRecordDragIn Is a list of type pairs; in each pair, the first is the type of a record which
- can be dragged into this aspect, and the second is the attribute type to store
- the reference in
- 'rst#' kDETAspectRecordCatDragIn Is a list of category/attribute type pairs; in each pair, the first is the
- category of records which can be dragged in, and the second is the type of
- attribute to place the alias in
- 'rst#' kDETAspectAttrDragIn Is a list of type triples; in each triple, the first is the record type which can be
- dragged from (or "=" for any), the second is the attribute type which can be dragged
- in, and the third is the attribute type to store the new attribute in
- 'rst#' kDETAspectDragOut Is a list of attribute types which can be dragged out of this aspect
- 'detm' kDETAspectViewMenu Is a table to fill in the view menu from
- 'detp' kDETAspectReverseSort Is a table listing which properties to sort in reverse order
- 'ipcw' kDETAspectInfoPageCustomWindow Is a specification of a custom window size/placement & whether to use the
- page-selector (main aspect only)
- (note: this resource should not be used for normal info-pages)
- 'rst#' kDETAspectExternalCategory Contains the external (user-visible) names which correspond to the categories in
- kDETAspectCategory; if this resource is not present, external names are taken from
- another template; if no other template provides an external name for a given internal
- category, the internal name is used as the external name (main aspect only)
-
- }
-
- kDETAspectCode = 4;
- kDETAspectName = 5;
- kDETAspectCategory = 6;
- kDETAspectKind = 7;
- kDETAspectGender = 8;
- kDETAspectWhatIs = 9;
- kDETAspectMainBitmap = 10;
- kDETAspectBalloons = 11;
- kDETAspectNewMenuName = 12;
- kDETAspectNewEntryName = 13;
- kDETAspectNewValue = 14;
- kDETAspectLookup = 15;
- kDETAspectDragInString = 16;
- kDETAspectDragInVerb = 17;
- kDETAspectDragInSummary = 18;
- kDETAspectRecordDragIn = 19;
- kDETAspectRecordCatDragIn = 20;
- kDETAspectAttrDragIn = 21;
- kDETAspectAttrDragOut = 22;
- kDETAspectViewMenu = 23;
- kDETAspectReverseSort = 24;
- kDETAspectInfoPageCustomWindow = 25;
- kDETAspectExternalCategory = 26;
-
-
- { Properties: }
-
- { Each aspect has 250 attribute properties in this range: }
- kDETFirstLocalProperty = 0;
- kDETLastLocalProperty = (kDETFirstLocalProperty+249);
-
- { Developers should use property numbers starting at this point: }
- kDETFirstDevProperty = 40;
-
- { Finally, the following range provide constant numeric properties for use in patterns and comparisons: }
- kDETFirstConstantProperty = 250;
- kDETLastConstantProperty = (kDETFirstConstantProperty+249);
-
- { To convert a number into a constant property, add this: }
- kDETConstantProperty = kDETFirstConstantProperty;
-
- kDETZeroProperty = (kDETConstantProperty+0);
- kDETOneProperty = (kDETConstantProperty+1);
- kDETFalseProperty = (kDETConstantProperty+0);
- kDETTrueProperty = (kDETConstantProperty+1);
-
- { The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: }
- kDETPrName = 3050;
- kDETPrKind = 3051;
-
- { Access mask properties: }
- kDETDNodeAccessMask = 27574; { the DNode access mask }
- kDETRecordAccessMask = 27575; { the record access mask }
- kDETAttributeAccessMask = 27576; { the attribute access mask }
- kDETPrimaryMaskByBit = 27577; { a set of sixteen properties to access all bits of the primary mask }
-
- { See OCE documentation for details definitions of each of these bits: }
-
- kDETPrimarySeeMask = kDETPrimaryMaskByBit;
- kDETPrimaryAddMask = (kDETPrimaryMaskByBit+1);
- kDETPrimaryDeleteMask = (kDETPrimaryMaskByBit+2);
- kDETPrimaryChangeMask = (kDETPrimaryMaskByBit+3);
- kDETPrimaryRenameMask = (kDETPrimaryMaskByBit+4);
- kDETPrimaryChangePrivsMask = (kDETPrimaryMaskByBit+5);
- kDETPrimaryTopMaskBit = (kDETPrimaryMaskByBit+15);
-
- { Template numbers (can be used with kDETAspectTemplate and kDETInfoPageTemplate target selectors): }
- kDETAspectTemplateNumber = 22051;
- kDETInfoPageTemplateNumber = 22052;
-
-
- { Property types are used to specify types of properties and conversions between types (negative numbers
- are reserved for Apple; developer code resources can use positive numbers): }
- kDETPrTypeNone = 0; { No type }
- kDETPrTypeNumber = -1; { A number }
- kDETPrTypeString = -2; { A STRING }
- kDETPrTypeBinary = -3; { A binary block }
-
-
- { ************************************ Info-pages }
-
- { Info-pages include the following as well:
- resource ('deti', id) identifies the type of resource; see below for details on the contents
- resource ('rstr', id+kDETInfoPageName) is the name of the view to use in the page selection pop-up
- resource ('rstr', id+kDETInfoPageMainViewAspect) is the name of the aspect to use with the main page view
- resource ('rstr', id+kDETInfoPageMenuName) is the name of the directories menu ("Directories" if nil)
- resource ('detm', id+kDETInfoPageMenuEntries) are menu entries to add after a gray line after the "New..." entries;
- use "-" for a gray line between entries
- }
-
- kDETInfoPageName = 4;
- kDETInfoPageMainViewAspect = 5;
- kDETInfoPageMenuName = 6;
- kDETInfoPageMenuEntries = 7;
-
-
- { ************************************ Views }
-
- { Flags: }
-
- kDETNoFlags = $0000; {0}
- kDETEnabled = $0001; {1 << 0}
- kDETHilightIfSelected = $0001; {1 << 0}
- kDETChoosable = $0002; {1 << 1}
- kDETNumericOnly = $0008; {1 << 3}
- kDETMultiLine = $0010; {1 << 4}
- kDETViewSendCommandToWindow = $0020; {1 << 5}
-
- { The folowing flags make sense for views only }
-
- { for EditText views only }
- kDETHidePenOnOpen = $0100; {1 << 8}
- kDETDynamicSize = $0200; {1 << 9}
- kDETAllowNoColons = $0400; {1 << 10}
-
- { Sizes for icons4 }
- kDETLargeIcon = 0;
- kDETSmallIcon = 1;
- kDETMiniIcon = 2;
-
- { Stolen from TextEdit.h }
- kDETLeft = 0;
- kDETCenter = 1;
- kDETRight = -1;
- kDETForceLeft = -2;
-
- kDETUnused = 0;
- kDETNoValue = $80000000;
- kDETNoSort = 0;
- kDETNoProperty = -1;
-
- { Attributes for TViewBox - these are distinct from the flags above }
-
- kDETBoxTakesContentClicks = $0001; {1 << 0}
- kDETBoxIsRounded = $0002; {1 << 1}
- kDETBoxIsGrayed = $0004; {1 << 2}
- kDETBoxIsInvisible = $0008; {1 << 3}
-
- { The common font info }
- kDETApplicationFont = 1;
- kDETApplicationFontSize = 9;
- kDETAppFontLineHeight = 12;
-
- kDETSystemFont = 0;
- kDETSystemFontSize = 12;
- kDETSystemFontLineHeight = 16;
-
- kDETDefaultFont = 1;
- kDETDefaultFontSize = 9;
- kDETDefaultFontLineHeight = 12;
-
- { These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): }
- kDETNormal = 0;
- kDETBold = 1;
- kDETItalic = 2;
- kDETUnderline = 4;
- kDETOutline = 8;
- kDETShadow = $10;
- kDETCondense = $20;
- kDETExtend = $40;
-
- kDETIconStyle = -3; { Normal for regular icons, italic for aliases }
-
- { Views IDs: }
-
- kDETCustomViewMenuID = 10;
-
- kDETChangeViewCommand = 'view'; { Change the view; used especially in StaticCommandTextFromView sublist headers }
-
-
- { Info-page window size: }
- kDETRecordInfoWindHeight = 228;
- kDETRecordInfoWindWidth = 400;
-
- kDETAttributeInfoWindHeight = 250;
- kDETAttributeInfoWindWidth = 230;
-
- {kDETAppFontLineHeight = 12;}
-
- { Note: The following defines set up an info-page layout which is for interim use only;
- a more permanent layout will be defined later }
-
- { Defines for subpages (template filled-in areas) }
- kDETSubpageTop = 0;
- kDETSubpageLeft = 64;
- kDETSubpageBottomInset = 8;
- kDETSubpageRightInset = 8;
-
- { Page identifying icon }
- kDETSubpageIconTop = 8;
- kDETSubpageIconLeft = 8;
- kDETSubpageIconBottom = (kDETSubpageIconTop+32);
- kDETSubpageIconRight = (kDETSubpageIconLeft+32);
- (* #define kDETSubpageIconRect {kDETSubpageIconTop, kDETSubpageIconLeft, kDETSubpageIconBottom, kDETSubpageIconRight} *)
-
- { Page identifying label }
- kDETSubpageLabelTop = (kDETSubpageIconBottom+8);
- kDETSubpageLabelLeft = (kDETSubpageIconLeft);
- kDETSubpageLabelBottom = (kDETSubpageLabelTop+kDETAppFontLineHeight);
- kDETSubpageLabelRight = (kDETRecordInfoWindWidth-20);
- (* #define kDETSubpageLabelRect {kDETSubpageLabelTop, kDETSubpageLabelLeft, kDETSubpageLabelBottom, kDETSubpageLabelRight} *)
-
- { For pages with a single function, here's where the button goes }
- kDETSubpage1ButtonTop = 120;
- kDETSubpage1ButtonLeft = 110;
- kDETSubpage1ButtonBottom = (kDETSubpage1ButtonTop+50);
- kDETSubpage1ButtonRight = (kDETSubpage1ButtonLeft+200);
- (* #define kDETSubpage1ButtonRect {kDETSubpage1ButtonTop, kDETSubpage1ButtonLeft, kDETSubpage1ButtonBottom, kDETSubpage1ButtonRight} *)
-
- { Column placement for non-sublist placements }
- kDET1stColumnLeft = (kDETSubpageLeft-10);
- kDET1stColumnRight = (kDETSubpageLeft+68);
- kDET2ndColumnLeft = (kDET1stColumnRight+2);
- kDETRecord2ndColumnRight = (kDETRecordInfoWindWidth - kDETSubpageRightInset);
- kDETAttribute2ndColumnRight = (kDETAttributeInfoWindWidth - kDETSubpageRightInset);
-
- kDETColumnTop = 38;
-
- { Sublist placement }
- kDETSublistTop = (kDETSubpageIconBottom+16+kDETAppFontLineHeight+4);
- kDETSublistLeft = 10;
- kDETSublistBottomInset = 10;
- kDETSublistBottom = (kDETRecordInfoWindHeight - kDETSublistBottomInset);
- kDETSublistRightInset = 10;
- kDETSublistRight = (kDETRecordInfoWindWidth - kDETSublistRightInset);
-
- (* #define kDETSublistRect { kDETSublistTop, kDETSublistLeft, kDETSublistBottom, kDETSublistRight } *)
-
- kDETSublistEntryTop = (-kDETAppFontLineHeight/2);
- kDETSublistEntryBottom = (kDETSublistEntryTop + kDETAppFontLineHeight);
-
- (* #define kDETSublistTitleBitmapRect { kDETListTop-10, kDETListLeftInset+4, kDETListTop-4, kDETListLeftInset+4+16 } *)
- kDETSublistTitleTop = (kDETSublistTop-kDETAppFontLineHeight-2);
- kDETSublistTitleBottom = (kDETSublistTop-2);
- kDETSublistIconColumnWidth = 16;
- kDETSublistNameColumnWidth = 200;
- kDETSublistKindColumnWidth = 96;
- kDETSublistSpaceBetweenColumns = 2;
- kDETSublistIconColumnLeft = kDETSublistSpaceBetweenColumns;
- kDETSublistIconColumnRight = (kDETSublistIconColumnLeft + kDETSublistIconColumnWidth);
- kDETSublistNameColumnLeft = (kDETSublistIconColumnRight + kDETSublistSpaceBetweenColumns);
- kDETSublistNameColumnRight = (kDETSublistNameColumnLeft + kDETSublistNameColumnWidth);
- kDETSublistKindColumnLeft = (kDETSublistNameColumnRight + 8); { need extra space because size is right-justified }
- kDETSublistKindColumnRight = (kDETSublistKindColumnLeft + kDETSublistKindColumnWidth);
-
-
- { ************************************ Killers }
-
- { Killers include the following as well:
- resource ('rst#', id+kDETKillerName) contains a list of names to be killed
- }
-
- kDETKillerName = 1;
-
-
- { ************************************ Forwarders }
-
- { Forwarders include the following as well:
- resource ('rst#', id+kDETForwarderAspectNames) contains a list of names of aspects to forward to
- resource ('rst#', id+kDETInfoPageNames) contains a list of names of info-pages to forward to
- }
-
- kDETForwarderTemplateNames = 4;
-
-
-
- {*********************************************************************************}
- {******************************** Categories: ************************************}
- {*********************************************************************************}
-
- { Internal category names: }
-
- kDETCategoryAllCategories = 'All Categories'; { Everything in a specific category }
- kDETCategoryAllItems = 'All Items'; { Everything in or out of a category }
- kDETCategoryAddressItems = 'Address Items'; { Anything that can be used to address something }
- kDETCategoryPeople = 'People'; { People }
-
-
-
-
-
- {*********************************************************************************}
- {******************************** Code Resources: ********************************}
- {*********************************************************************************}
-
- { Target specification: }
-
- { Values of DETTargetSelector }
- kDETSelf = 0; { The "current" item }
- kDETSelfOtherAspect = 1; { Another aspect of the current item }
- kDETParent = 2; { The parent (i.e., the aspect we're in the sublist of, if any) of the current item }
- kDETSublistItem = 3; { The ith item in the sublist }
- kDETSelectedSublistItem = 4; { The ith selected item in the sublist }
- kDETDSSpec = 5; { The item specified by the packed DSSpec }
- kDETChainedTargetSpec = 6; { A chain of specifications (apply each specification in the chain in sequence) }
- kDETAspectTemplate = 7; { A specific aspect template (number itemNumber) }
- kDETInfoPageTemplate = 8; { A specific info-page template (number itemNumber) }
- kDETHighSelector = $F000; { Force type to be INTEGER }
-
- TYPE
- DETTargetSelector = LONGINT;
-
- TYPE
- DETTargetSpecification = RECORD
- selector: DETTargetSelector; { How to pick the item (above: see) }
- aspectName: RStringPtr; { The name of the aspect (kDETSelfOtherAspect, kDETParentOtherAspect,
- kDETSublistItem, kDETSelectedSublistItem, kDETDSSpec); nil for main aspect }
- itemNumber: LONGINT; { Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate) }
- dsSpec: PackedDSSpecPtr; { DSSpec (only: kDETDSSpec) }
- next: ^DETTargetSpecification; { Next item in chain (used only when original item was kChainedTargetSpec) }
- END;
-
-
- { Code resource calls and call-backs both return an OSType:
- kDETDidNotHandle (1) = function not completed, try something else (used by template to say "I didn't handle it");
- noErr = function completed successfully;
- any error = function failed, and here's why
- }
-
- CONST
- kDETDidNotHandle = 1;
-
- { Call-back functions:
-
- reqFunction Action
- ----------- ------
- kDETcmdBeep Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
-
- kDETcmdBusy Put up watch cursor and switch processes; user events elicit a beep
-
- kDETcmdChangeCallFors Change call-fors mask
-
- kDETcmdGetCommandSelectionCount Get the command selection count (for calls which have a command selection list)
- kDETcmdGetCommandItemN Get command selection item n (for calls which have a command selection list)
-
- kDETcmdGetDSSpec Get the PackedDSSpec for this object
-
- kDETcmdGetTemplateFSSpec Get the FSSpec of the file containing the template (should be seldom used)
-
- kDETcmdGetOpenEdit Return the property of the view being edited (if any)
- kDETcmdCloseEdit Close the current edit
-
- kDETcmdGetPropertyType Get a property type
-
- kDETcmdGetPropertyNumber Get a property, number format
- kDETcmdGetPropertyRString Get a property, RString format
- kDETcmdGetPropertyBinarySize Get a property, binary, return size
- kDETcmdGetPropertyBinary Get a property, binary format
-
- kDETcmdGetPropertyChanged Get a property changed flag
- kDETcmdGetPropertyEditable Get a property editable flag
-
- kDETcmdSetPropertyType Set a property type
-
- kDETcmdSetPropertyNumber Set a property, number format
- kDETcmdSetPropertyRString Set a property, RString format
- kDETcmdSetPropertyBinary Set a property, binary data & size
-
- kDETcmdSetPropertyChanged Set a property changed flag
- kDETcmdSetPropertyEditable Set a property editable flag
-
- kDETcmdDirtyProperty Dirty a property (redraw: force)
-
- kDETcmdSublistCount Return the count of the sublist items
- kDETcmdSelectedSublistCount Return the count of the selected sublist items
-
- kDETcmdRequestSync Request a sync-up of the aspect with the directory
-
- kDETcmdAddMenu Add to the end of a dynamic menu
- kDETcmdRemoveMenu Remove a dynamic menu item
- kDETcmdMenuItemRString Get a dynamic menu item RString
-
- kDETcmdOpenDSSpec PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
-
- kDETcmdAboutToTalk About to talk to user: bring us to front, disable watch cursor, etc.
-
- kDETcmdBreakAttribute Break an attribute -- apply all applicable patterns to an attribute to generate properties
- kDETcmdSaveProperty Force a save of a property -- apply all applicable patterns to write out the property
-
- kDETcmdGetCustomViewUserReference Get custom view user reference (as given in .r file)
- kDETcmdGetCustomViewBounds Get custom view current bounds
-
- kDETcmdGetResource Get a resource from a template
-
- kDETcmdTemplateCounts Return number of aspect and info-page templates in system
-
- kDETcmdUnloadTemplates Flush templates
- }
-
-
- {Values of DETCallBackFunctions }
- kDETcmdSimpleCallback = 0;
- kDETcmdBeep = 1;
- kDETcmdBusy = 2;
- kDETcmdChangeCallFors = 3;
- kDETcmdGetCommandSelectionCount = 4;
- kDETcmdGetCommandItemN = 5;
- kDETcmdOpenDSSpec = 6;
- kDETcmdAboutToTalk = 7;
- kDETcmdUnloadTemplates = 8;
- kDETcmdTemplateCounts = 9;
-
- kDETcmdTargetedCallback = 1000;
- kDETcmdGetDSSpec = 1001;
- kDETcmdSublistCount = 1002;
- kDETcmdSelectedSublistCount = 1003;
- kDETcmdRequestSync = 1004;
- kDETcmdBreakAttribute = 1005;
- kDETcmdGetTemplateFSSpec = 1006;
- kDETcmdGetOpenEdit = 1007;
- kDETcmdCloseEdit = 1008;
-
- kDETcmdPropertyCallback = 2000;
- kDETcmdGetPropertyType = 2001;
- kDETcmdGetPropertyNumber = 2002;
- kDETcmdGetPropertyRString = 2003;
- kDETcmdGetPropertyBinarySize = 2004;
- kDETcmdGetPropertyBinary = 2005;
- kDETcmdGetPropertyChanged = 2006;
- kDETcmdGetPropertyEditable = 2007;
- kDETcmdSetPropertyType = 2008;
- kDETcmdSetPropertyNumber = 2009;
- kDETcmdSetPropertyRString = 2010;
- kDETcmdSetPropertyBinary = 2011;
- kDETcmdSetPropertyChanged = 2012;
- kDETcmdSetPropertyEditable = 2013;
- kDETcmdDirtyProperty = 2014;
- kDETcmdAddMenu = 2015;
- kDETcmdRemoveMenu = 2016;
- kDETcmdMenuItemRString = 2017;
- kDETcmdSaveProperty = 2018;
- kDETcmdGetCustomViewUserReference = 2019;
- kDETcmdGetCustomViewBounds = 2020;
- kDETcmdGetResource = 2021;
-
- kDETcmdHighCallback = $F0000000; { Force type to be LONGINT }
-
- TYPE
- DETCallBackFunctions = LONGINT;
-
-
- DETCallBackBlockHeader = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- END;
-
- DETCallBackBlockTargetedHeader = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- END;
-
- DETCallBackBlockPropertyHeader = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
- END;
-
-
- DETProtoCallBackBlock = DETCallBackBlockPropertyHeader;
-
-
-
-
- DETBeepBlock = DETCallBackBlockHeader;
-
-
- DETBusyBlock = DETCallBackBlockHeader;
-
-
- DETChangeCallForsBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- newCallFors: LONGINT; { -> New call-for mask }
- END;
-
-
- DETGetCommandSelectionCountBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
-
- count: LONGINT; { <- The number of items in the command selection list }
- END;
-
-
- CONST
- {Values of DETItemType }
- kDETHFSType = 0; { HFS item type }
- kDETDSType = 1; { Directory Service item type }
- kDETMailType = 2; { Mail (letter) item type }
- kDETMoverType = 3; { Sounds, fonts, etc., from inside a suitcase or system file }
- kDETLastItemType = $F0000000; { Force it to be a LONGINT (C & C++ seem to disagree about the definition of $F000) }
-
- TYPE
- DETItemType = LONGINT;
-
-
-
- DETFSInfo = RECORD { FSSpec plus possibly interesting additional info }
- fileType: OSType; { File type }
- fileCreator: OSType; { File creator }
- fdFlags: INTEGER; { Finder flags }
- fsSpec: FSSpec; { FSSpec }
- END;
-
- DETFSInfoPtr = ^DETFSInfo;
-
- LetterSpecPtr = ^LetterSpec;
- LetterSpecHandle = ^LetterSpecPtr;
-
- DETGetCommandItemNBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
-
- itemNumber: LONGINT; { -> Item number to retrieve (1-based) }
- itemType: DETItemType; { -> Type of item to be returned (if we can interpret it as such) }
- CASE INTEGER OF
- 1: (fsInfo: ^DETFSInfoPtr); { <- FSSpec & info for item (caller must disposHandle() when done) }
- 2: (ds: RECORD
- dsSpec: ^PackedDSSpecPtr; { <- DSSpec for item (caller must disposHandle() when done) }
- refNum: INTEGER; { <- Refnum for returned address }
- identity: AuthIdentity; { <- Identity for returned address }
- END);
-
- 3: (dsSpec: ^PackedDSSpecPtr); { <- DSSpec for item (caller must disposHandle() when done) }
- 4: (ltrSpec: LetterSpecHandle); { <- Letter spec for item (caller must disposHandle() when done) }
- END;
-
-
- DETGetDSSpecBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- dsSpec: ^PackedDSSpecPtr; { <- Handle with result (caller must disposHandle() when done) }
- refNum: INTEGER; { <- Refnum for address if PD }
- identity: AuthIdentity; { <- Identity for address }
- isAlias: BOOLEAN; { <- True if this entry is an alias }
- isRecordRef: BOOLEAN; { <- True if this entry is a record reference }
- END;
-
-
- DETGetTemplateFSSpecBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- fsSpec: FSSpec; { <- FSSpec of template file }
- baseID: INTEGER; { <- Base ID of this template }
- aspectTemplateNumber: LONGINT; { <- The template number for this aspect template }
- END;
-
- DETGetOpenEditBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- viewProperty: INTEGER; { <- The property of the view being edited (or kNoProperty if none) }
- END;
-
- DETCloseEditBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- END;
-
- DETGetPropertyTypeBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyType: INTEGER; { <- The type of the property }
- END;
-
-
- DETGetPropertyNumberBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyValue: LONGINT; { <- The value of the property }
- END;
-
-
- DETGetPropertyRStringBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyValue: RStringHandle; { <- A handle containing the property (as an RString) (caller must disposHandle() when done) }
- END;
-
-
- DETGetPropertyBinarySizeBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyBinarySize: LONGINT; { <- The size of the property as a binary block }
- END;
-
-
- DETGetPropertyBinaryBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyValue: Handle; { <- Handle with the value of the property (caller must disposHandle() when done) }
- END;
-
-
- DETGetPropertyChangedBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyChanged: BOOLEAN; { <- True if the property is marked as changed }
- END;
-
-
- DETGetPropertyEditableBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyEditable: BOOLEAN; { <- True if the property can be edited by the user }
- END;
-
-
- DETSetPropertyTypeBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- newType: INTEGER; { -> New type for property (just sets type, does not convert contents) }
- END;
-
-
- DETSetPropertyNumberBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- newValue: LONGINT; { -> New value to set property to (and set type to number) }
- END;
-
-
- DETSetPropertyRStringBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- newValue: RStringPtr; { -> New value to set property to (and set type to RString) }
- END;
-
-
- DETSetPropertyBinaryBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- newValue: Ptr; { -> New value to set property to (and set type to binary) }
- newValueSize: LONGINT; { -> Size of new value }
- END;
-
-
- DETSetPropertyChangedBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyChanged: BOOLEAN; { -> Value to set changed flag on property to }
- END;
-
-
- DETSetPropertyEditableBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- propertyEditable: BOOLEAN; { -> Value to set editable flag on property to }
- END;
-
-
- DETDirtyPropertyBlock = DETCallBackBlockPropertyHeader;
-
-
- DETSublistCountBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- count: LONGINT; { <- The number of items in the current item's sublist }
- END;
-
-
- DETSelectedSublistCountBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- count: LONGINT; { <- The number of selected items in the current item's sublist }
- END;
-
-
- DETRequestSyncBlock = DETCallBackBlockTargetedHeader;
-
-
- DETAddMenuBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- name: ^RString; { -> Name of new menu item }
- parameter: LONGINT; { -> Parameter to return when this item is selected }
- addAfter: LONGINT; { -> Parameter of entry to add after, or -1 for add at end }
- END;
-
-
- DETRemoveMenuBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- itemToRemove: LONGINT; { -> Parameter of menu item to remove }
- END;
-
-
- DETMenuItemRStringBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- itemParameter: LONGINT; { -> Parameter of menu item to return STRING for }
- rString: RStringHandle; { <- Handle with the RString (caller must disposHandle() when done) }
- END;
-
-
- DETOpenDSSpecBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
-
- dsSpec: PackedDSSpecPtr; { -> DSSpec of object to be opened }
- END;
-
-
- DETAboutToTalkBlock = DETCallBackBlockHeader;
-
-
- DETBreakAttributeBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
-
- breakAttribute: AttributePtr; { -> Attribute to parse }
- END;
-
-
- DETSavePropertyBlock = DETCallBackBlockPropertyHeader;
-
-
- DETGetCustomViewUserReferenceBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- userReference: INTEGER; { <- User reference value, as specified in the .r file }
- END;
-
-
- DETGetCustomViewBoundsBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- bounds: Rect; { <- Bounds of the view }
- END;
-
-
- DETGetResourceBlock = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
- target: DETTargetSpecification; { The target for the request }
- property: INTEGER; { The property to apply the request to }
-
- resourceType: ResType; { -> Resource type }
- theResource: Handle; { <- The resource handle (caller must dispose when done) }
- END;
-
- DETTemplateCounts = RECORD
- reqFunction: DETCallBackFunctions; { Requested function }
-
- aspectTemplateCount: LONGINT; { <- Number of aspect templates in the system }
- infoPageTemplateCount: LONGINT; { <- Number of info-page templates in the system }
- END;
-
-
- DETUnloadTemplatesBlock = DETCallBackBlockHeader;
-
-
-
- DETCallBackBlock = RECORD
- CASE INTEGER OF
- 1: (protoCallBack: DETProtoCallBackBlock);
- 2: (beep: DETBeepBlock);
- 3: (busy: DETBusyBlock);
- 4: (changeCallFors: DETChangeCallForsBlock);
- 5: (getCommandSelectionCount: DETGetCommandSelectionCountBlock);
- 6: (getCommandItemN: DETGetCommandItemNBlock);
- 7: (getDSSpec: DETGetDSSpecBlock);
- 8: (getTemplateFSSpec: DETGetTemplateFSSpecBlock);
- 9: (getOpenEdit: DETGetOpenEditBlock);
- 10: (closeEdit: DETCloseEditBlock);
- 11: (getPropertyType: DETGetPropertyTypeBlock);
- 12: (getPropertyNumber: DETGetPropertyNumberBlock);
- 13: (getPropertyRString: DETGetPropertyRStringBlock);
- 14: (getPropertyBinarySize: DETGetPropertyBinarySizeBlock);
- 15: (getPropertyBinary: DETGetPropertyBinaryBlock);
- 16: (getPropertyChanged: DETGetPropertyChangedBlock);
- 17: (getPropertyEditable: DETGetPropertyEditableBlock);
- 18: (setPropertyType: DETSetPropertyTypeBlock);
- 19: (setPropertyNumber: DETSetPropertyNumberBlock);
- 20: (setPropertyRString: DETSetPropertyRStringBlock);
- 21: (setPropertyBinary: DETSetPropertyBinaryBlock);
- 22: (setPropertyChanged: DETSetPropertyChangedBlock);
- 23: (setPropertyEditable: DETSetPropertyEditableBlock);
- 24: (dirtyProperty: DETDirtyPropertyBlock);
- 25: (sublistCount: DETSublistCountBlock);
- 26: (selectedSublistCount: DETSelectedSublistCountBlock);
- 27: (requestSync: DETRequestSyncBlock);
- 28: (addMenu: DETAddMenuBlock);
- 29: (removeMenu: DETRemoveMenuBlock);
- 30: (menuItemRString: DETMenuItemRStringBlock);
- 31: (openDSSpec: DETOpenDSSpecBlock);
- 32: (aboutToTalk: DETAboutToTalkBlock);
- 33: (breakAttribute: DETBreakAttributeBlock);
- 34: (saveProperty: DETSavePropertyBlock);
- 35: (getCustomViewUserReference: DETGetCustomViewUserReferenceBlock);
- 36: (getCustomViewBounds: DETGetCustomViewBoundsBlock);
- 37: (getResource: DETGetResourceBlock);
- 38: (templateCounts: DETTemplateCounts);
- 39: (unloadTemplates: DETUnloadTemplatesBlock);
- END;
-
- DETCallBackBlockPtr = ^DETCallBackBlock;
-
-
- DETCallBack = ProcPtr;
- { FUNCTION DETCallBack(
- callBlockPtr: ^DETCallBlock, DETCallBackBlockPtr callBackBlockPtr): OSErr;}
-
-
- { Call functions:
-
- reqFunction Action
- ----------- ------
- kDETcmdInit Called once when template is first loaded (good time to allocate private data); returns call-for list
- kDETcmdExit Called once when template is freed (good time to free private data)
-
- kDETcmdInstanceInit Called once when instance of template is started (good time to allocate private instance data)
- kDETcmdInstanceExit Called once when instance is ended (good time to free private instance data)
-
- kDETcmdIdle Called periodically during idle times
-
- kDETcmdPropertyCommand Command received in the property number range (usually means a button's been pushed)
-
- kDETcmdControlEnabled Called to determine if a control is enabled
- kDETcmdMaximumTextLength Return maximum size for text form of property
-
- kDETcmdViewListChanged Called when the window view-list (list of enabled views) has changed
-
- kDETcmdPropertyDirtied Property dirtied, need to redraw
-
- kDETcmdValidateSave Validate save: about to save info-page, return noErr (1: or) if it's OK to do so
-
- kDETcmdDropQuery Drop query: return the appropriate operation for this drag; ask destination
- kDETcmdDropMeQuery Drop query: return the appropriate operation for this drag; ask dropee
-
- kDETcmdAttributeCreation New attribute creation about to occur; this gives the template chance to modify
- the value that's about to be created
- kDETcmdAttributeNew Attribute value new (return 1 to let normal new processing occur)
- kDETcmdAttributeChange Attribute value change (return 1 to let normal change processing occur)
- kDETcmdAttributeDelete Attribute value delete (return 1 to let normal deletion occur); sent to the
- main aspect of the attribute that's about to be deleted
-
- kDETcmdPatternIn Code resource pattern element on reading in an attribute or property
- kDETcmdPatternOut Code resource pattern element on writing out an attribute or property
-
- kDETcmdShouldSync Check if the code resource wants to force a sync (update data from directory)
- kDETcmdDoSync Give code resource a chance to sync (read in and break all attributes)
-
- kDETcmdOpenSelf Self open
-
- kDETcmdConvertToNumber Convert template-defined property type to number
- kDETcmdConvertToRString Convert template-defined property type to RString
- kDETcmdConvertFromNumber Convert from number to template-defined property type
- kDETcmdConvertFromRString Convert from RString to template-defined property type
-
- kDETcmdCustomViewDraw Custom view draw
- kDETcmdCustomViewMouseDown Custom view mouse down
- kDETcmdCustomViewKeyPress Custom view key press
- kDETcmdCustomViewPaste Custom view paste
-
- kDETcmdCustomMenuSelected Custom menu selected
- kDETcmdCustomMenuEnabled Custom menu enabled
-
- kDETcmdDynamicForwarders Return a list of dynamically created forwarders
- kDETcmdDynamicResource Return a dynamically created resource
- }
-
-
- CONST
- { Values of DETCallFunctions }
- kDETcmdSimpleCall = 0;
- kDETcmdInit = 1;
- kDETcmdExit = 2;
- kDETcmdAttributeCreation = 3;
- kDETcmdDynamicForwarders = 4;
-
- kDETcmdTargetedCall = 1000;
- kDETcmdInstanceInit = 1001;
- kDETcmdInstanceExit = 1002;
- kDETcmdIdle = 1003;
- kDETcmdViewListChanged = 1004;
- kDETcmdValidateSave = 1005;
- kDETcmdDropQuery = 1006;
- kDETcmdDropMeQuery = 1007;
- kDETcmdAttributeNew = 1008;
- kDETcmdAttributeChange = 1009;
- kDETcmdOpenSelf = 1010;
- kDETcmdDynamicResource = 1011;
- kDETcmdAttributeDelete = 1012;
- kDETcmdShouldSync = 1013;
- kDETcmdDoSync = 1014;
-
- kDETcmdPropertyCall = 2000;
- kDETcmdPropertyCommand = 2001;
- kDETcmdControlEnabled = 2002;
- kDETcmdMaximumTextLength = 2003;
- kDETcmdPropertyDirtied = 2004;
- kDETcmdPatternIn = 2005;
- kDETcmdPatternOut = 2006;
- kDETcmdConvertToNumber = 2007;
- kDETcmdConvertToRString = 2008;
- kDETcmdConvertFromNumber = 2009;
- kDETcmdConvertFromRString = 2010;
- kDETcmdCustomViewDraw = 2011;
- kDETcmdCustomViewMouseDown = 2012;
- kDETcmdCustomViewKeyPress = 2013;
- kDETcmdCustomMenuSelected = 2014;
- kDETcmdCustomMenuEnabled = 2015;
- kDETcmdCustomViewPaste = 2016;
-
- kDETcmdHighCall = $F0000000;
-
- TYPE
- DETCallFunctions = LONGINT;
-
-
- DETCallBlockHeader = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- END;
-
- DETCallBlockPropertyHeader = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
- END;
-
- DETProtoCallBlock = DETCallBlockPropertyHeader;
-
-
- DETInitBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- newCallFors: LONGINT; { <- New call-for mask }
- END;
-
-
- DETExitBlock = DETCallBlockHeader;
-
-
- DETInstanceInitBlock = DETCallBlockHeader;
-
-
- DETInstanceExitBlock = DETCallBlockHeader;
-
-
- DETInstanceIdleBlock = DETCallBlockHeader;
-
-
- DETPropertyCommandBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- parameter: LONGINT; { -> Parameter of command }
- END;
-
-
- DETControlEnabledBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- isEnabled: BOOLEAN; { <- Return true if the control should be enabled }
- END;
-
-
- DETMaximumTextLengthBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- maxSize: LONGINT; { <- Return the maximum size of the property as a text STRING }
- END;
-
-
- DETViewListChangedBlock = DETCallBlockHeader;
-
-
- DETPropertyDirtiedBlock = DETCallBlockPropertyHeader;
-
-
- DETValidateSaveBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- errorString: RStringHandle; { <- Handle with error STRING if validation fails (callee must allocate handle, DE will DisposHandle() it) }
- END;
-
- { Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): }
- CONST
- kDETDoNothing = 'xxx0';
- kDETMove = 'move';
- kDETDrag = 'drag';
- kDETAlias = 'alis';
-
- TYPE
- DETDropQueryBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- modifiers: INTEGER; { -> Modifiers at drop time (option/control/command/shift keys) }
- commandID: LONGINT; { <-> Command ID (aeDoNothing, aeMove, aeCopy, aeAlias, or a property number) }
- destinationType: AttributeType; { <-> Type to convert attribute to }
- copyToHFS: BOOLEAN; { <- If true, object should be copied to HFS before being operated on, and deleted after }
- END;
-
-
- DETDropMeQueryBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- modifiers: INTEGER; { -> Modifiers at drop time (option/control/command/shift keys) }
- commandID: LONGINT; { <-> Command ID (aeDoNothing, aeMove, aeCopy, aeAlias, or a property number) }
- destinationType: AttributeType; { <-> Type to convert attribute to }
- copyToHFS: BOOLEAN; { <- If true, object should be copied to HFS before being operated on, and deleted after }
- END;
-
-
- DETAttributeCreationBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- parent: PackedDSSpecPtr; { -> The object within which the creation will occur }
- refNum: INTEGER; { -> Refnum for returned address (DSSpecs in PDs only) }
- identity: AuthIdentity; { -> The identity we're browsing as in the parent object }
- attrType: AttributeType; { <-> The type of the attribute being created }
- attrTag: AttributeTag; { <-> The tag of the attribute being created }
- value: Handle; { <-> The value to write (pre-allocated, resize as needed) }
- END;
-
-
- DETAttributeNewBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- parent: PackedDSSpecPtr; { -> The object within which the creation will occur }
- refNum: INTEGER; { -> Refnum for returned address (DSSpecs in PDs only) }
- identity: AuthIdentity; { -> The identity we're browsing as in the parent object }
- attrType: AttributeType; { <-> The type of the attribute being created }
- attrTag: AttributeTag; { <-> The tag of the attribute being created }
- value: Handle; { <-> The value to write (pre-allocated, resize as needed) }
- END;
-
-
- DETAttributeChangeBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- parent: PackedDSSpecPtr; { -> The object within which the creation will occur }
- refNum: INTEGER; { -> Refnum for returned address (DSSpecs in PDs only) }
- identity: AuthIdentity; { -> The identity we're browsing as in the parent object }
- attrType: AttributeType; { <-> The type of the attribute being changed }
- attrTag: AttributeTag; { <-> The tag of the attribute being changed }
- attrCID: AttributeCreationID; { <-> The CID of the attribute being changed }
- value: Handle; { <-> The value to write (pre-allocated, resize as needed) }
- addAgain: BOOLEAN; { <- True if returned attribute should be added rather than changed (when returning 1) }
- END;
-
- DETAttributeDeleteBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- dsSpec: PackedDSSpecPtr; { -> The object within which the deletion will occur }
- refNum: INTEGER; { -> Refnum for returned address (DSSpecs in PDs only) }
- identity: AuthIdentity; { -> The identity we're browsing as }
- END;
-
- DETShouldSyncBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- shouldSync: BOOLEAN; { <- True if we should now sync with directory }
- END;
-
- DETDoSyncBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- END;
-
- DETPatternInBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- elementType: LONGINT; { -> Element type from pattern }
- extra: LONGINT; { -> Extra field from pattern }
- attribute: AttributePtr; { -> The complete attribute }
- dataOffset: LONGINT; { -> Offset to current (next) byte }
- bitOffset: INTEGER; { -> Bit offset (next bit ^is fData >> fBitOffset++) }
- END;
-
-
- DETPatternOutBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- elementType: LONGINT; { -> Element type from pattern }
- extra: LONGINT; { -> Extra field from pattern }
- attribute: AttributePtr; { -> The attribute (minus the data portion) }
- data: Handle; { -> Data to be written (pre-allocated, resize and add at end) }
- dataOffset: LONGINT; { -> Offset to next byte to write }
- bitOffset: INTEGER; { -> Bit offset (zero: if; handle will need to be resized to one more byte before write) }
- END;
-
-
- DETOpenSelfBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- modifiers: INTEGER; { -> Modifiers at open time (option/control/command/shift keys) }
- END;
-
-
- DETConvertToNumberBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theValue: LONGINT; { <- The converted value to return }
- END;
-
-
- DETConvertToRStringBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theValue: RStringHandle; { <- A handle with the converted value (callee must allocate handle, DE will DisposHandle() it) }
- END;
-
-
- DETConvertFromNumberBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theValue: LONGINT; { -> The value to convert (result should be written direct to the property) }
- END;
-
-
- DETConvertFromRStringBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theValue: RStringPtr; { -> The value to convert (result should be written direct to the property) }
- END;
-
-
- DETCustomViewDrawBlock = DETCallBlockPropertyHeader;
-
-
- DETCustomViewMouseDownBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theEvent: ^EventRecord; { -> The original event record of the mouse-down }
- END;
-
-
- DETCustomViewKeyPressBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- theEvent: ^EventRecord; { -> The original event record of the key-press }
- END;
-
-
- DETCustomViewPasteBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
- property: INTEGER; { The property number the call refers to }
-
- modifiers: INTEGER; { -> Modifiers at paste time (option/control/command/shift keys) }
- END;
-
- DETCustomMenuSelectedBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- menuTableParameter: INTEGER; { -> The "property" field from the custom menu table }
- END;
-
-
- DETCustomMenuEnabledBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- menuTableParameter: INTEGER; { -> The "property" field from the custom menu table }
- enable: BOOLEAN; { <- Whether to enable the menu item }
- END;
-
-
- DETForwarderListItem = RECORD
- next: ^DETForwarderListPtr; { Pointer to next item, or nil }
- attributeValueTag: AttributeTag; { Tag of new templates (0 for none) }
- rstrs: PackedPathName; { Record type (empty if none), attrbute type (empty if none),
- aspect names to forward to, and info-page names to forward to }
- END;
-
- DETForwarderListPtr = ^DETForwarderListItem;
- DETForwarderListHandle = ^DETForwarderListPtr;
-
- DETDynamicForwardersBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- forwarders: DETForwarderListHandle; { <- List of forwaders }
- END;
-
-
- DETDynamicResourceBlock = RECORD
- reqFunction: DETCallFunctions; { Requested function }
- templatePrivate: LONGINT; { Private storage for use by code resource (stays for life of code resource,
- common to all invocations of code resource) }
- instancePrivate: LONGINT; { Private storage for use by code resource (separate for each item using the
- code resource) }
- callBack: DETCallBack; { Pointer to call-back routine }
- callBackPrivate: LONGINT; { Private data for the call-back routine }
- target: DETTargetSpecification; { The target (originator) of the call, for targeted and property calls }
- targetIsMainAspect: BOOLEAN; { True if the target is the main aspect (even though it has a non-nil name) }
-
- resourceType: ResType; { -> The resource type being requested }
- propertyNumber: INTEGER; { -> The property number of the resource being requested }
- resourceID: INTEGER; { -> The resource ID (base ID + property number) of the resource }
- theResource: Handle; { <- The requested resource }
- END;
-
-
-
- DETCallBlock = RECORD
- CASE INTEGER OF
- 1: (protoCall: DETProtoCallBlock);
- 2: (init: DETInitBlock);
- 3: (exit: DETExitBlock);
- 4: (instanceInit: DETInstanceInitBlock);
- 5: (instanceExit: DETInstanceExitBlock);
- 6: (instanceIdle: DETInstanceIdleBlock);
- 7: (propertyCommand: DETPropertyCommandBlock);
- 8: (controlEnabled: DETControlEnabledBlock);
- 9: (maximumTextLength: DETMaximumTextLengthBlock);
- 10: (viewListChanged: DETViewListChangedBlock);
- 11: (propertyDirtied: DETPropertyDirtiedBlock);
- 12: (validateSave: DETValidateSaveBlock);
- 13: (dropQuery: DETDropQueryBlock);
- 14: (dropMeQuery: DETDropMeQueryBlock);
- 15: (attributeCreationBlock: DETAttributeCreationBlock);
- 16: (attributeNew: DETAttributeNewBlock);
- 17: (attributeChange: DETAttributeChangeBlock);
- 18: (attributeDelete: DETAttributeDeleteBlock);
- 19: (patternIn: DETPatternInBlock);
- 20: (patternOut: DETPatternOutBlock);
- 21: (shouldSync: DETShouldSyncBlock);
- 22: (doSync: DETDoSyncBlock);
- 23: (openSelf: DETOpenSelfBlock);
- 24: (convertToNumber: DETConvertToNumberBlock);
- 25: (convertToRString: DETConvertToRStringBlock);
- 26: (convertFromNumber: DETConvertFromNumberBlock);
- 27: (convertFromRString: DETConvertFromRStringBlock);
- 28: (customViewDraw: DETCustomViewDrawBlock);
- 29: (customViewMouseDown: DETCustomViewMouseDownBlock);
- 30: (customViewKeyPress: DETCustomViewKeyPressBlock);
- 31: (customViewPaste: DETCustomViewPasteBlock);
- 32: (customMenuSelected: DETCustomMenuSelectedBlock);
- 33: (customMenuEnabled: DETCustomMenuEnabledBlock);
- 34: (dynamicForwarders: DETDynamicForwardersBlock);
- 35: (dynamicResource: DETDynamicResourceBlock);
- END;
-
- DETCallBlockPtr = ^DETCallBlock;
-
- { Call-for list: }
-
- CONST
- kDETCallForAnything = 1; { Call at all }
- kDETCallForIdle = 2; { kDETcmdIdle }
- kDETCallForCommands = 4; { kDETcmdPropertyCommand, kDETcmdSelfOpen }
- kDETCallForViewChanges = 8; { kDETcmdControlEnabled, kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength }
- kDETCallForDrops = $10; { kDETcmdDropQuery, kDETcmdDropMeQuery }
- kDETCallForAttributes = $20; { kDETcmdAttributeNew, kDETcmdAttributeChange }
- kDETCallForValidation = $40; { kDETcmdValidateSave }
- kDETCallForKeyPresses = $80; { kDETcmdCustomViewKeyPress and kDETcmdCustomViewPaste on all key-presses }
- kDETCallForResources = $100; { kDETcmdDynamicResource }
- kDETCallForSyncing = $200; { kDETcmdShouldSync, kDETcmdDoSync }
- kDETCallForEscalation = $8000; { all calls escalated to the next level }
-
- kDETCallForNothing = 0; { none of the above }
- kDETCallForEverything = $FFFFFFFF; { all of the above }
-
- TYPE
- DETCall = ProcPtr; { FUNCTION DETCall(callBlockPtr: DETCallBlockPtr): OSErr;}
-
-
- { This following macro saves you from having to dig out the call-back pointer from the call block: }
-
- { #define CallBackDET(callBlockPtr, callBackBlockPtr) ((*callBlockPtr->protoCall.callBack)(callBlockPtr, callBackBlockPtr)) }
-
-
- { Errors specific to Directories Extension Templates }
-
- { Note: This section will be moved to OCEErrors.h eventually }
-
-
-
- { ************************************************************************************ }
- { ********************************* SAM Definitions: ********************************* }
- { ************************************************************************************ }
-
-
- { SAM Developers should use property numbers starting at this point: }
- CONST
- kSAMFirstDevProperty = kDETFirstDevProperty + 10;
-
-
- {
- SAM templates have additional resources/properties that are required
- for interaction with the A.O.C.E. Connections control panel.
-
- Type Offset Description
- ---- ------ -----------
- 'rstr' kSAMAspectStatus The string displayed as the slot's status
- 'detn' kSAMAspectCannotDelete If 0, then the slot cannot be deleted
- 'detn' kSAMAspectServesDSAM If 0, not a DSAM template, otherwise is a DSAM template
- 'detn' kSAMAspectServesMSAM If 0, not an MSAM template, otherwise is an MSAM template
- 'sami' kSAMAspectSlotCreationInfo The info required to create a slot record
- }
-
- CONST
- kSAMAspectStatus = kDETFirstDevProperty + 1;
- kSAMAspectCannotDelete = kDETFirstDevProperty + 2;
- kSAMAspectServesDSAM = kDETFirstDevProperty + 3;
- kSAMAspectServesMSAM = kDETFirstDevProperty + 4;
- kSAMAspectSlotCreationInfo = kDETFirstDevProperty + 5;
-
-
- { The standard "Status" RStrings are stored in an rst# resource.
- Here is the resource ID and the indices into the resource }
-
- CONST
- kSAMStatusStrings = -16523;
- kSAMNotSetup = 1;
- kSAMActive = 2;
- kSAMInactive = 3;
-
- { ************************************************************************************** }
- { ********************************* Admin Definitions: ********************************* }
- { ************************************************************************************** }
-
- kDETAdminVersion = -978;
-
- {$ENDC} { UsingOCETemplates }
-
- {$IFC NOT UsingIncludes}
- END.
- {$ENDC}
-